package com.ironone.streaming.application;

import android.content.Context;
import android.support.v4.widget.SlidingPaneLayout;
import android.util.AttributeSet;
import android.view.MotionEvent;

public class MySlidingPaneLayout extends SlidingPaneLayout{

	public MySlidingPaneLayout(Context context, AttributeSet attrs) {
		super(context, attrs);
	}

	@Override
	public boolean onTouchEvent(MotionEvent event){
		if (!FormObject.getInstance().getIsSlidingPaneLayoutSlidable()) {
			// Careful here, view might be null
			getChildAt(1).dispatchTouchEvent(event);
			return true;
		}
		return super.onTouchEvent(event);
	}
}